package com.bridge.baselibs.eventbus;

import org.greenrobot.eventbus.EventBus;

public class EventBusUtil {
    public static EventBus getEventBus() {
        return EventBus.getDefault();
    }

    public static void register(Object subscriber) {
        getEventBus().register(subscriber);
    }

    public static void unregister(Object subscriber) {
        getEventBus().unregister(subscriber);
    }

    public static void sendEvent(EventMessage event) {
        getEventBus().post(event);
    }

    public static void sendStickyEvent(EventMessage event) {
        getEventBus().postSticky(event);
    }
}
